#include <bits/stdc++.h>
#include "../../tools/tools.h"
using namespace std;

constexpr int INF = 0x7fffffff; // 无穷大
typedef long long ll;

class Solution {
public:
    int valueAfterKSeconds(int n, int k) {
        vector<int> arr(n , 1);
        for(int i = 0; i < k; i++) {
            for(int j = 1; j < n; j++) {
                arr[j] = (arr[j] + arr[j - 1]) % 1000000007;
            }
        }
        return arr[n - 1];
    }
};
int main(int argc, const char** argv) {
    Solution s;
    debug(s.valueAfterKSeconds(4,5));
    debug(s.valueAfterKSeconds(5,3));
    return 0;
}
